package com.isnmp.nms.framework.discover.rstype;

import java.util.List;
import java.util.Vector;

import com.isnmp.common.snmp.SNMPFactory;
import com.isnmp.nms.framework.discover.DeviceInfo;
import com.isnmp.nms.framework.discover.ResourceInfo;
import com.isnmp.nms.framework.discover.ResourceSearchMothType;

public abstract class SNMPGroupBasicMothType extends ResourceSearchMothType {
    public abstract Class getORMappingClass();

    public List<ResourceInfo> getResoureInfo(DeviceInfo paramDeviceInfo) {
        Vector localVector = new Vector();
        Object localObject1;
        try {
            localObject1 = getORMappingClass().newInstance();
        } catch (Exception localException1) {
            localException1.printStackTrace();
            return localVector;
        }
        try {
            Object localObject2 = SNMPFactory.getSNMPAPI().getMibObject(localObject1, paramDeviceInfo.getSnmpTarget());
            ResourceInfo localResourceInfo = new ResourceInfo();
            localResourceInfo.setLocalDevice(paramDeviceInfo);
            localResourceInfo.setResourceTypeName(getResoureTypeName());
            localResourceInfo.setResourceRSIDValue(getResourceRSID());
            localResourceInfo.setResourceName(getResoureTypeName());
            localResourceInfo.setResourceObjectInfo(localObject2);
            localVector.add(localResourceInfo);
        } catch (Exception localException2) {
        }
        return localVector;
    }
}